//
//  HotViewController.swift
//  DHLive
//
//  Created by Mac on 2021/7/1.
//

import UIKit
private let kHotCell = "kHotCell"
class HotViewController: BaseViewController {
    @IBOutlet weak var tableView: UITableView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        tableView.register(UINib(nibName: "HotCell", bundle: nil), forCellReuseIdentifier: kHotCell)

    }

}

extension HotViewController: UITableViewDataSource {
    func numberOfSections(in tableView: UITableView) -> Int {
        1
    }
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        100
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: kHotCell, for: indexPath) as! HotCell
        
        return cell
    }
    
}

extension HotViewController: UITableViewDelegate {
    
    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let liveVC = LiveViewController()
        navigationController?.pushViewController(liveVC, animated: true)
    }
    
}


extension HotViewController {
    func loadData() {
//        NetworkTool.requst(urlString: getAllUrl, type: .POST, params: nil) { result in
//            print("vc", result)
////            result as [String: Any]
//        }
    }
}
